Recharge prices for each single Record....

Stimulsoft Reports.NET discussion
jjc
Posts: 97
Joined: Mon Apr 19, 2010 10:14 pm

Recharge prices for each single Record....

Post by jjc »

HI all,
i am facing with a difficult issue(at least for me is it difficult ) ...in my report i have a Window form that i choose the data to send to the report in this Window form there are many services as Hotels,Trains,Tranfers and so ... in a ChechekListBoxControl there is the list of Hotel to send to the Report after that i checked the Hotel i wish increase the price of a percentage for each single Hotel (each Hotel has 3 Period(Low Season, High Season and Peak Season) and and 3 types of Room(Single,Double and Triple) ) sincerely i was thinking how work out this task, i was thinking if it was possible increase each Hotel the price of all Rooms but till now i have not idea where i should begin to do that.

DO you have some suggestion about how to perform this task ? or it is not possible do that in a report???

Thanks for your attention .
I wish you good day.

Cheers
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Recharge prices for each single Record....

Post by Jan »

Hello,

I'm not sure that i correctly understand your task, but i think you can use variables. For example, variable Discount (or something also). Create variable in report dictionary with decimal type. After then set value to this variable in form code regarding with some logic (by default value i think must be equal to 1). After then you can use it in your expressions in report. For example:

Code: Select all

{MyDataSource.MyPrint * Discount}
You can use same logic for other conditions.

Thank you.
jjc
Posts: 97
Joined: Mon Apr 19, 2010 10:14 pm

Recharge prices for each single Record....

Post by jjc »

Hi Jan,
thanks to reply my question,i will explain better my task i was not clear in my topic,in CheckedListBoxCOntrol i have a list of 50 Hotels so i choose only 30 Hotels (to send to the report) but i wish recharge a different price(price of Room for different Period(Low,High and Peak)) for each hotel in this way:
Hotel1 + 6%;
Hotel2 + 3%;
Hotel3 + 10%;
Hotel4 + 8%;
....... and so on...

In my report already i can recharge the price for another service (Transfer ) and i use this way:
i have a TextBox(textBox1) in the Form so i put the value of percentage that i wish increase using this code:

Code: Select all

 {IIF(TextBox1.Text == null,Transport_TBL._1Pax_RealContractCost,(((Transport_TBL._1Pax_RealContractCost *  System.Convert.ToDecimal(TextBox1.Text)) / 100) + Transport_TBL._1Pax_RealContractCost).ToString("N0")) }
but with this way i can increase the price of all record with the same value of percentage instead in the Hotel i need to increase the value of percentage for each single record.

I show you a picture of the report about the section of Hotel so you can understand better :).
Image
I hope to help you understand what i wish do however don't hesitate to ask me i will reply as soon as possible.

However tomorrow i will try your advice .:blush:

Have a good day and thanks for your support.

Cheers
Andrew
Posts: 4109
Joined: Fri Jun 09, 2006 3:58 am

Recharge prices for each single Record....

Post by Andrew »

Hello,
i wish recharge a different price(price of Room for different Period(Low,High and Peak)) for each hotel in this way:
Hotel1 + 6%;
Hotel2 + 3%;
Hotel3 + 10%;
Hotel4 + 8%;
....... and so on...
Where can we get these values from (6%, 3%, 10%, 8%) ?

Waiting for a reply.
Thank you.
jjc
Posts: 97
Joined: Mon Apr 19, 2010 10:14 pm

Recharge prices for each single Record....

Post by jjc »

Hi Andrew,
so i will try to explain you better my task,i have a CheckedBoxListControl1 where retrieve a list of Cities when i checked the Cities in another CheckedListBoxControl2 there are all Hotels refering to the Cities i checked so i need to increase a percentage of price for each single Hotel that i checked in the CheckedListBoxControl2 , but if there are 50 Hotels sincerely i don't know how increase the percentage for each single Hotel .
Where can we get these values from (6%, 3%, 10%, 8%) ?
Here there is a trouble because how i told before if i choose 50 Hotels i don't know how perform these feature, i was thinking to create a lot of TextBox in the Form but how combine each TextBox in order with Hotels checked in the CheckedListBoxControl2 ,i got stuck here for my poor knowledge ...

i try to make an example in the CheckedListBoxControl2 i have 4 Hotels as follow:

1 - "Imperial Hotel" so i wish increase it of + 5%;
2 - "DeLuxe Hotel" i wish increase it of + 10%;
3 - "Europe Hotel" i wish increase it of + 7%;
4 - "Tropical Hotel" i wish increase it of + 9 %;

but when we make report we can choose also 30 Hotels or 10 Hotels so here i get the trouble how increase the percentage for each single Hotel.:angry:

I hope i was clear to explain my trouble if isn't don't hesitate to ask me more detaìls.

Have a good day.

Cheers
Andrew
Posts: 4109
Joined: Fri Jun 09, 2006 3:58 am

Recharge prices for each single Record....

Post by Andrew »

Hello,

Do we understand you correct that the % values are not stored in the database and you manually input them and, for each hotel, you need to show its own textbox and input values in it?

Thank you.
jjc
Posts: 97
Joined: Mon Apr 19, 2010 10:14 pm

Recharge prices for each single Record....

Post by jjc »

Do we understand you correct that the % values are not stored in the database and you manually input them and, for each hotel, you need to show its own textbox and input values in it?
Hi Andrew yes the percentage will not be stored from the database but we need input in manually and i was thinking to use a TextBox for each Hotels and input a value .

Here i show you a picture about the Form and you can see the CheckedListBoxControl1(that store the cities from the database) and CheckedListBoControl2 (that store all Hotels from the Cities that i checked in the CheckedListBoxControl1).

http://www.mediafire.com/imageview.php? ... jn&thumb=4

instead in the next picture(it is the report ) you can see in which fields i need to recharge the price :

http://www.mediafire.com/imageview.php? ... em&thumb=4

if you can see in the fields "SGL, DBL, TPL ,Lunch ,Dinner" there are the prices stored from the Database so my task increase the price (recharge)of a value for each single Hotel as follow :

1 - EQUATORIAL HOTEL recharge + 10% (so when i compile the report the fields 'SGL, DBL, TPL ,Lunch ,Dinner ' would be increase the price + 10%);
and so on with others Hotel but the value of recharge will be different for each single Hotel.

I am sorry for my bad English but i will try to help you to understand my task.

Thanks so much fro your attention.

Have a good day.

Cheers
Andrew
Posts: 4109
Joined: Fri Jun 09, 2006 3:58 am

Recharge prices for each single Record....

Post by Andrew »

Hello,

You can do it from code: write a code that will add the required number of textboxes to the form, and then get values from there. But this will be a very complicated code and you need to write it yourself. Also, forms in our reporting tool are used to output simple parameters of a report and it is much better for you to create all forms to input data in your application.

Thank you.
jjc
Posts: 97
Joined: Mon Apr 19, 2010 10:14 pm

Recharge prices for each single Record....

Post by jjc »

Hi Andrew,
thanks for your advice,in fact i found out a solution but as you said i need to write down a lot of code and use many Forms to display many TextBox ...
for now it is the best way to work out this task .
If i can fin out one way better i will let you know .

Thanks so much for your attention.

Have a good day.

Cheers
Andrew
Posts: 4109
Joined: Fri Jun 09, 2006 3:58 am

Recharge prices for each single Record....

Post by Andrew »

Have a nice day!
Post Reply