Jump to content
Software FX Community

Save chart property settings by chart/user


User (Legacy)

Recommended Posts

Hi,

I need to save the chart properties/settings per user per chart. I need to

store these settings in a database so that they can be retrieved by the user

independent of his machine. I am using Windows forms and this is a client

server application.

I looked at the documentation and found PersonalizedFlags property which may

be of some help in this regard. However, I could not find any code samples

about its implementation. I need to know the following:

1. What should be the PersonalizedFlags value that I need to set.

2. When should the export() method be actually called? i.e. the user may

change n number of properties for a chart and may then move on to a new

chart or a new form.

3. The most important thing is when I should call the Import() method. If I

have set certain properties explicitly for a chart and then I call the

Import() method, will the properties be overwritten?

I read somewhere that if I use XML as the file format to store the settings

than only the modified values are saved. How can I save all the

properties/settings irrespective of whether they are modified or not.

Any help would be great for me to begin and do some R&D in this regard. If I

can get a sample code, it would be really helpful.

Thanks,

Pankaj.

Link to comment
Share on other sites

Personalization is a process that works automatically, you don't need to do 

anything except to turn it on (through PersonalizedFlags), however, this

process will save the charts on its own and you won't be able to do it in

your own database.

Using Import/Export will give you complete control on when and what to

save/restore.

> 2. When should the export() method be actually called? i.e. the user may

> change n number of properties for a chart and may then move on to a new

> chart or a new form.

You can call Export when the form closes, if PersonalizedFlags is set to

AutoSave, we do this automatically.

> 3. The most important thing is when I should call the Import() method. If

> I

> have set certain properties explicitly for a chart and then I call the

> Import() method, will the properties be overwritten?

Import will override whatever was saved, that's precisely what it does. You

can control what gets saved using the FileMask property.

> I read somewhere that if I use XML as the file format to store the

> settings

> than only the modified values are saved. How can I save all the

> properties/settings irrespective of whether they are modified or not.

When an XML is read, the properties are read ON TOP of the current chart,

what this means is that any property not saved in the XML will remain the

same after Import. When you export to an XML, only non-default values are

exported, for this reason, when you later read form the same XML default

values will NOT be reset.

For example, lets say you have a chart where Chart3D is set to false

(default value), if you save this chart, Chart3D will not be saved. Later

on, when you Import this file into another chart, after import the value of

Chart3D will remain unchanged, regardless of its current value.

When saving binary files, values are always saved regardless of its default

value.

--

FP

Software FX

Link to comment
Share on other sites

Note that if you turn on the PersonalizedFlags.ServerSide you will receive 

an even when the user clicks on the Load/Save Personalized Chart. You must

attach to the Personalized Event in your webform.

In the case of Save you will receive a stream that contains the chart

settings (template). This template does not contain any data.

In the case of Load you should load the chart template from the database and

apply it to the chart in question (using Import)

Note that we do not support automatic save/loads with server side charts,

you can easily achieve auto load by importing the chart template before

generating the chart.

Regards,

JC

"Pankaj Sabnis" <pankaj.sabnis@businessengine.com> wrote in message

news:DGoWg1jSFHA.2344@webserver3.softwarefx.com...

> Hi,

>

> I need to save the chart properties/settings per user per chart. I need to

> store these settings in a database so that they can be retrieved by the

> user

> independent of his machine. I am using Windows forms and this is a client

> server application.

>

> I looked at the documentation and found PersonalizedFlags property which

> may

> be of some help in this regard. However, I could not find any code samples

> about its implementation. I need to know the following:

>

> 1. What should be the PersonalizedFlags value that I need to set.

> 2. When should the export() method be actually called? i.e. the user may

> change n number of properties for a chart and may then move on to a new

> chart or a new form.

> 3. The most important thing is when I should call the Import() method. If

> I

> have set certain properties explicitly for a chart and then I call the

> Import() method, will the properties be overwritten?

>

> I read somewhere that if I use XML as the file format to store the

> settings

> than only the modified values are saved. How can I save all the

> properties/settings irrespective of whether they are modified or not.

>

> Any help would be great for me to begin and do some R&D in this regard. If

> I

> can get a sample code, it would be really helpful.

>

> Thanks,

> Pankaj.

>

>

Link to comment
Share on other sites

Sorry, I just noticed that your question relates to Windows Forms. I will 

check if we can support this scenario (maybe using the same Personalized

event) in future versions of the product.

JC

"Software FX Support" <none@noreply.com> wrote in message

news:p9RNP4qSFHA.1588@webserver3.softwarefx.com...

> Note that if you turn on the PersonalizedFlags.ServerSide you will receive

> an even when the user clicks on the Load/Save Personalized Chart. You must

> attach to the Personalized Event in your webform.

>

> In the case of Save you will receive a stream that contains the chart

> settings (template). This template does not contain any data.

>

> In the case of Load you should load the chart template from the database

> and apply it to the chart in question (using Import)

>

> Note that we do not support automatic save/loads with server side charts,

> you can easily achieve auto load by importing the chart template before

> generating the chart.

>

> Regards,

>

> JC

>

>

> "Pankaj Sabnis" <pankaj.sabnis@businessengine.com> wrote in message

> news:DGoWg1jSFHA.2344@webserver3.softwarefx.com...

>> Hi,

>>

>> I need to save the chart properties/settings per user per chart. I need

>> to

>> store these settings in a database so that they can be retrieved by the

>> user

>> independent of his machine. I am using Windows forms and this is a client

>> server application.

>>

>> I looked at the documentation and found PersonalizedFlags property which

>> may

>> be of some help in this regard. However, I could not find any code

>> samples

>> about its implementation. I need to know the following:

>>

>> 1. What should be the PersonalizedFlags value that I need to set.

>> 2. When should the export() method be actually called? i.e. the user may

>> change n number of properties for a chart and may then move on to a new

>> chart or a new form.

>> 3. The most important thing is when I should call the Import() method. If

>> I

>> have set certain properties explicitly for a chart and then I call the

>> Import() method, will the properties be overwritten?

>>

>> I read somewhere that if I use XML as the file format to store the

>> settings

>> than only the modified values are saved. How can I save all the

>> properties/settings irrespective of whether they are modified or not.

>>

>> Any help would be great for me to begin and do some R&D in this regard.

>> If I

>> can get a sample code, it would be really helpful.

>>

>> Thanks,

>> Pankaj.

>>

>>

>

>

Link to comment
Share on other sites

Hi,

I am still having problems with Personalization. I am not using Auto

Load/Save. I am explicitly calling Import and Export methods. It works fine

for Pie and Bubble charts. However, for Bar charts (Grid = Horizontal as

well as Grid = Vertical), it gives me "No Data Available" on the chart when

I refresh the chart. Before doing a refresh I call the export method. I

verified that the file was created on the client machine. I debugged and

found that the following Import call gave me an error:

Me.Import(FileFormat.BinaryTemplate, Me.ChartSettingsPath +

Me.ChartId.ToString)

The error that I receive is:

Object Reference Not set to an instance of an object

All the parameters passed to Import() have a proper value. None of them is

Nothing or Null.

I checked the application logs and there was no refernce related to this

error. I presume this is an internal error in the Import() method. I am

unable to proceed any further. This is an urgent requirement for me.

Can you please help me in this regard?

NOTE: All the settings related files are stored in 'C:\Documents and

Settings\PankajS\Local Settings\Application Data\Business Engine\Alignment

Engine\Charts' folder.

Thanks,

Pankaj.

"Software FX Support" <none@noreply.com> wrote in message

news:Ka6QU5qSFHA.2344@webserver3.softwarefx.com...

> Sorry, I just noticed that your question relates to Windows Forms. I will

> check if we can support this scenario (maybe using the same Personalized

> event) in future versions of the product.

>

> JC

>

> "Software FX Support" <none@noreply.com> wrote in message

> news:p9RNP4qSFHA.1588@webserver3.softwarefx.com...

> > Note that if you turn on the PersonalizedFlags.ServerSide you will

receive

> > an even when the user clicks on the Load/Save Personalized Chart. You

must

> > attach to the Personalized Event in your webform.

> >

> > In the case of Save you will receive a stream that contains the chart

> > settings (template). This template does not contain any data.

> >

> > In the case of Load you should load the chart template from the database

> > and apply it to the chart in question (using Import)

> >

> > Note that we do not support automatic save/loads with server side

charts,

> > you can easily achieve auto load by importing the chart template before

> > generating the chart.

> >

> > Regards,

> >

> > JC

> >

> >

> > "Pankaj Sabnis" <pankaj.sabnis@businessengine.com> wrote in message

> > news:DGoWg1jSFHA.2344@webserver3.softwarefx.com...

> >> Hi,

> >>

> >> I need to save the chart properties/settings per user per chart. I need

> >> to

> >> store these settings in a database so that they can be retrieved by the

> >> user

> >> independent of his machine. I am using Windows forms and this is a

client

> >> server application.

> >>

> >> I looked at the documentation and found PersonalizedFlags property

which

> >> may

> >> be of some help in this regard. However, I could not find any code

> >> samples

> >> about its implementation. I need to know the following:

> >>

> >> 1. What should be the PersonalizedFlags value that I need to set.

> >> 2. When should the export() method be actually called? i.e. the user

may

> >> change n number of properties for a chart and may then move on to a new

> >> chart or a new form.

> >> 3. The most important thing is when I should call the Import() method.

If

> >> I

> >> have set certain properties explicitly for a chart and then I call the

> >> Import() method, will the properties be overwritten?

> >>

> >> I read somewhere that if I use XML as the file format to store the

> >> settings

> >> than only the modified values are saved. How can I save all the

> >> properties/settings irrespective of whether they are modified or not.

> >>

> >> Any help would be great for me to begin and do some R&D in this regard.

> >> If I

> >> can get a sample code, it would be really helpful.

> >>

> >> Thanks,

> >> Pankaj.

> >>

> >>

> >

> >

>

>

Link to comment
Share on other sites

Can you send to support at softwarefx.com the File that when imported gives 

you the null reference? Please provide a pointer to this newsgroup thread

and any other information required to reproduce this issue.

JC

SoftwareFX Support

"Pankaj Sabnis" <pankaj.sabnis@businessengine.com> wrote in message

news:G7NBA38TFHA.2608@webserver3.softwarefx.com...

> Hi,

>

> I am still having problems with Personalization. I am not using Auto

> Load/Save. I am explicitly calling Import and Export methods. It works

> fine

> for Pie and Bubble charts. However, for Bar charts (Grid = Horizontal as

> well as Grid = Vertical), it gives me "No Data Available" on the chart

> when

> I refresh the chart. Before doing a refresh I call the export method. I

> verified that the file was created on the client machine. I debugged and

> found that the following Import call gave me an error:

>

> Me.Import(FileFormat.BinaryTemplate, Me.ChartSettingsPath +

> Me.ChartId.ToString)

>

> The error that I receive is:

> Object Reference Not set to an instance of an object

>

> All the parameters passed to Import() have a proper value. None of them is

> Nothing or Null.

>

> I checked the application logs and there was no refernce related to this

> error. I presume this is an internal error in the Import() method. I am

> unable to proceed any further. This is an urgent requirement for me.

>

> Can you please help me in this regard?

>

> NOTE: All the settings related files are stored in 'C:\Documents and

> Settings\PankajS\Local Settings\Application Data\Business Engine\Alignment

> Engine\Charts' folder.

>

> Thanks,

> Pankaj.

>

>

>

> "Software FX Support" <none@noreply.com> wrote in message

> news:Ka6QU5qSFHA.2344@webserver3.softwarefx.com...

>> Sorry, I just noticed that your question relates to Windows Forms. I will

>> check if we can support this scenario (maybe using the same Personalized

>> event) in future versions of the product.

>>

>> JC

>>

>> "Software FX Support" <none@noreply.com> wrote in message

>> news:p9RNP4qSFHA.1588@webserver3.softwarefx.com...

>> > Note that if you turn on the PersonalizedFlags.ServerSide you will

> receive

>> > an even when the user clicks on the Load/Save Personalized Chart. You

> must

>> > attach to the Personalized Event in your webform.

>> >

>> > In the case of Save you will receive a stream that contains the chart

>> > settings (template). This template does not contain any data.

>> >

>> > In the case of Load you should load the chart template from the

>> > database

>> > and apply it to the chart in question (using Import)

>> >

>> > Note that we do not support automatic save/loads with server side

> charts,

>> > you can easily achieve auto load by importing the chart template before

>> > generating the chart.

>> >

>> > Regards,

>> >

>> > JC

>> >

>> >

>> > "Pankaj Sabnis" <pankaj.sabnis@businessengine.com> wrote in message

>> > news:DGoWg1jSFHA.2344@webserver3.softwarefx.com...

>> >> Hi,

>> >>

>> >> I need to save the chart properties/settings per user per chart. I

>> >> need

>> >> to

>> >> store these settings in a database so that they can be retrieved by

>> >> the

>> >> user

>> >> independent of his machine. I am using Windows forms and this is a

> client

>> >> server application.

>> >>

>> >> I looked at the documentation and found PersonalizedFlags property

> which

>> >> may

>> >> be of some help in this regard. However, I could not find any code

>> >> samples

>> >> about its implementation. I need to know the following:

>> >>

>> >> 1. What should be the PersonalizedFlags value that I need to set.

>> >> 2. When should the export() method be actually called? i.e. the user

> may

>> >> change n number of properties for a chart and may then move on to a

>> >> new

>> >> chart or a new form.

>> >> 3. The most important thing is when I should call the Import() method.

> If

>> >> I

>> >> have set certain properties explicitly for a chart and then I call the

>> >> Import() method, will the properties be overwritten?

>> >>

>> >> I read somewhere that if I use XML as the file format to store the

>> >> settings

>> >> than only the modified values are saved. How can I save all the

>> >> properties/settings irrespective of whether they are modified or not.

>> >>

>> >> Any help would be great for me to begin and do some R&D in this

>> >> regard.

>> >> If I

>> >> can get a sample code, it would be really helpful.

>> >>

>> >> Thanks,

>> >> Pankaj.

>> >>

>> >>

>> >

>> >

>>

>>

>

>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...