Showing posts with label details. Show all posts
Showing posts with label details. Show all posts

Friday, March 30, 2012

Invoice Detail

Hi

I have a invoice that displays the company name in a rectangle on top then it has a list in the list it has details tables my problem is that the invoice detail goes on the next page I need to have the company name as well on the second page I cant put it in the same table as the detail because I have a few tables in the detail so it is actually no header is it possible to have Repeated the Company name information on the next page?

Thanks

Try this:

http://blogs.msdn.com/ChrisHays/

You may be able to add a conditional text box that displays whenever RowNumber > a certain amount, which would be equal to the amount of records that could fit on a page.

cheers,

Andrew

|||<<

You may be able to add a conditional text box that displays whenever RowNumber > a certain amount, which would be equal to the amount of records that could fit on a page.>>

Hi Thanks Andrew

can you please explain a little bit more how you do this?

Thanks

|||A bit of a hack, but how about just creating another rectangle with visibility property =IIF(Globals!PageNumber.Value > 2)

Not sure if that will work though since the body does not know about page numbers.

Did you try Chris Hays's fix?

http://blogs.msdn.com/ChrisHays/

By passing in the RowNumber to a function, you should be able to toggle hidden property using something like =IIF(Code.RowCount(RowNumber(Nothing)) = 25, True, False)

Then just place the title in a new row in your table, or create a table within a table?

Apologies, hope you find an easier way.

cheers,
Andrew

Invicible Sub report for generating shared variables

Hi!

Im creating a report with a manual running total in a main report. As a condition to the running total, Im having a sub-report in the details section bringing a shared boolean variable back to the main report.

My problem is that I dont want the sub report to be visible. Have tried suppress it, but then the shared variable isnt brought to the main report correctly.

Please advice me!

Regards,
KarlSuppressing the report doesn't stop the execution of the report.
Show the code that you are using or screen shot.|||Suppress all sections of the subreport; the formulas etc. within it will still run. In the subreport's properties (right click it in the main report) choose suppress blank subreport. In the main report, choose suppress blank section.|||Hi!
Thanks for fast reply.

I've uploaded a screenshot of the report. When showing the sub-report, I'm getting the shared variables back. But if I suppress the section of the sub-report, the sub-report or un-select the can-grow flag, I'm not getting any share variable back (i.e. it's false).

Have anyone seen this behaviour before?

B.R
Karl|||If you suppress the subreport it doesn't run. That's why you suppress the sections within the subreport and suppress both a blank subreport and a blank section containing the subreport. It then still runs, but nothing is displayed.|||Yea, that works!
Thanks alot, you saved my day/week/job... :)

Regards,
Karl

Wednesday, March 28, 2012

Inventory update problem

I am trying to update a master inventory table from an order details table, the query below works fine except when the order details table contains the same code number multiple times. When this occurs the update only updates for the first instance of the code number.

How do I make the update work for all the records not just the unique records?

UPDATE Inventory.Inventory
SET Qty = Inventory.Inventory.Qty - Retail.OrderDetails.Qty FROM Inventory.Inventory INNER JOIN
Retail.OrderDetails ON Inventory.Inventory.Code = Retail.OrderDetails.Code
WHERE (Retail.OrderDetails.Invoice = 207070202)

Thanks

Quote:

Originally Posted by Kliot

I am trying to update a master inventory table from an order details table, the query below works fine except when the order details table contains the same code number multiple times. When this occurs the update only updates for the first instance of the code number.

How do I make the update work for all the records not just the unique records?

UPDATE Inventory.Inventory
SET Qty = Inventory.Inventory.Qty - Retail.OrderDetails.Qty FROM Inventory.Inventory INNER JOIN
Retail.OrderDetails ON Inventory.Inventory.Code = Retail.OrderDetails.Code
WHERE (Retail.OrderDetails.Invoice = 207070202)

Thanks


I think it is not possible in SQL Server. But it will work in MS Access.

You have to fetch record and then update it|||hi

i have gone through ur query, but if possible just send me 1 or two records of each table and tell me exactily what u want|||Here is an example,

Invoice table

Code|||Here is an example,

Invoice table

Code Quantity
DM01 2
LG02 2
DM01 3
QP76 1

The update query will update the Inventory table quantity for DM01 by 2 not 5, the second DM01 is not updated

I can get around this by doing a sum query inside the select but it's not ideal.

UPDATE Inventory.Inventory
set RQty = Inventory.Inventory.RQty - od.Quantity
FROM (SELECT Code, SUM(Quantity) AS Quantity FROM Retail.OrderDetails WHERE Invoice = 207022101
GROUP BY Code) as od WHERE(Inventory.inventory.code = od.code)

Wednesday, March 7, 2012

Invalid Argument provided

Error message I get is:
"Invalid Argument provided Details: Object reference not set to an instance of an object."

I get this message every time I run the report. If I verify database before runing report, message is gone and report runs fine. Data connection is done using a VB file datasets (DLL). There are few subreports on this file which use same DLL but different datasets. If reports are removed report runs fine no error messages.

Any ideas would be much appreciated.

RobertFound the issue, one of Crystal dll was not properly registered (by install), once you re-install everything works fine.

Cheers|||Found the issue, one of Crystal dll was not properly registered (by install), once you re-install everything works fine.

Cheers
It is appreciable that you shared the solution :)

Friday, February 24, 2012

INTERSECT MDX Query - Reg

Hi Everyone,

We are facing some problem in the cube particularly in INTERSECT function.

Here are the details.

Dimension Tables:

DimTime 200601

200602

DimProduct 01

02

DimUser 101

102

103

FactTables:

FactPlayer

Time Product User

200601 01 101

200601 02 101

200601 01 102

Transact SQL Query:

Select Count(*) from

(

Select userid from FactPlayer where productId = 01

INTERSECT

Select userid from FactPlayer where productId= 02

)

PlayerCount

We want the same result from MDX query. Can you please guide us how to do it by using INTERSECT.

Expecting your valuable reply.

Regards

Vijay


Hi Vijay,

You could solve this using the Intersect function, but you don't need to. Here's an example from Adventure Works showing all the Customers who bought products from two different subcategories (mountain bikes and caps):

select {[Measures].[Internet Sales Amount]} on 0,
nonempty(
nonempty(
[Customer].[Customer].[Customer].members,
([Measures].[Internet Sales Amount], [Product].[Subcategory].&[1])
)
, ([Measures].[Internet Sales Amount],[Product].[Subcategory].&[19])
)
on 1
from [Adventure Works]

What it's doing is using the nonempty function to return a list of Customers who bought products in subcategory 1, and then using another nonempty function to filter that list by those who bought products from subcategory 19. This, I think, will be more efficient than using the Intersect function although for the record here's the same query rewritten to use Intersect:

select {[Measures].[Internet Sales Amount]} on 0,
intersect(
nonempty(
[Customer].[Customer].[Customer].members,
([Measures].[Internet Sales Amount], [Product].[Subcategory].&[1])
)
,nonempty(
[Customer].[Customer].[Customer].members,
([Measures].[Internet Sales Amount],[Product].[Subcategory].&[19])
)
)
on 1
from [Adventure Works]

HTH,

Chris

|||

Hi Chris,

Thank you very much. It is working perfectly.

Vijay

|||

Hi Everyone,

We are facing some problem in the cube particularly in INTERSECT function.

Here are the details.

Dimension Tables:

DimTime 200601

200602

DimProduct 01

02

03

DimUser 101

102

FactTables:

FactPlayer

Time Product User

200601 01 101

200601 02 101

200601 01 102

200601 03 101

Transact SQL Query:

Select Count(*) from

(

Select user from FactPlayer where productId = 01

INTERSECT

Select user from FactPlayer where productId= 02

INTERSECT

Select user from FactPlayer where productId= 03

)

PlayerCount

RESULT: 1 (UserId: 101)

We want the same result from MDX query. Can you please guide us how to do it by using INTERSECT.

Expecting your valuable reply.

Regards

Vijay

|||

I found the solution below.

SELECT NON EMPTY{[Measures].[User ID Distinct Count]} ON COLUMNS,

INTERSECT

(

NONEMPTY

(

INTERSECT

(

NONEMPTY

(

[DIM USER].[DIM USER].CHILDREN,

([Dim Time].[TimeKey].&[200602],

[Measures].[User ID Distinct Count],

[DIM PRODUCT].[DIM PRODUCT].&[3])

),

NONEMPTY

(

[DIM USER].[DIM USER].CHILDREN,

([Dim Time].[TimeKey].&[200602],

[Measures].[User ID Distinct Count],

[DIM PRODUCT].[DIM PRODUCT].&[11])

)

)

),

NONEMPTY

(

[DIM USER].[DIM USER].CHILDREN,

([Dim Time].[TimeKey].&[200602],

[Measures].[User ID Distinct Count],

[DIM PRODUCT].[DIM PRODUCT].&[12])

)

)

ON ROWS

FROM [DSV KPI]

Please reply me if there any changes in the query.

Thank You

Vijay